package com.hkts.beltweigher.opc;

public enum InstrumentStatusEnum {

    one("东线1号皮带秤","1"), two("东线2号皮带秤", "2"),
    three("东线3号皮带秤", "3"), four("东线4号皮带秤", "4"),
    five("东线5号皮带秤", "5");

    //仪表对应的key
    public static final String instrument1key="1";

    public static final String instrument2key="2";

    public static final String instrument3key="3";

    public static final String instrument4key="4";

    public static final String instrument5key="5";

    private String name;
    private String index;
    private InstrumentStatusEnum(String name, String index) {
        this.name = name;
        this.index = index;
    }
    public static String getName(String index) {
        for (InstrumentStatusEnum c : InstrumentStatusEnum.values()) {
            if (c.getIndex() == index) {
                return c.name;
            }
        }
        return null;
    }
    // get set 方法
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getIndex() {
        return index;
    }
    public void setIndex(String index) {
        this.index = index;
    }

}
